-- ----------------------------
-- Table structure for magic_api_file
-- ----------------------------
DROP TABLE IF EXISTS `magic_api_file`;
CREATE TABLE `magic_api_file` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `file_path` varchar(255) NOT NULL DEFAULT '' COMMENT '文件路径',
  `file_content` text NOT NULL COMMENT '文件内容',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of magic_api_file
-- ----------------------------
BEGIN;
INSERT INTO `magic_api_file` VALUES (1, '/magic-api/api/', 'this is directory');
INSERT INTO `magic_api_file` VALUES (2, '/magic-api/backups/', 'this is directory');
INSERT INTO `magic_api_file` VALUES (3, '/magic-api/function/', 'this is directory');
INSERT INTO `magic_api_file` VALUES (4, '/magic-api/api/用户管理/', 'this is directory');
INSERT INTO `magic_api_file` VALUES (5, '/magic-api/api/用户管理/group.json', '{\n  \"id\" : \"bd2bf1fee496480483792f0fd1be0660\",\n  \"name\" : \"用户管理\",\n  \"type\" : \"1\",\n  \"parentId\" : \"0\",\n  \"path\" : \"/users\"\n}');
INSERT INTO `magic_api_file` VALUES (6, '/magic-api/api/用户管理/用户列表.ms', '{\n  \"id\" : \"0aa254ad8815403f980881372042147f\",\n  \"script\" : null,\n  \"groupId\" : \"bd2bf1fee496480483792f0fd1be0660\",\n  \"name\" : \"用户列表\",\n  \"createTime\" : null,\n  \"updateTime\" : null,\n  \"method\" : \"GET\",\n  \"path\" : \"/list\",\n  \"parameters\" : [ ],\n  \"option\" : \"[]\",\n  \"requestBody\" : \"{}\",\n  \"headers\" : [ ],\n  \"paths\" : [ ],\n  \"responseBody\" : \"{\\n    \\\"code\\\": 1,\\n    \\\"message\\\": \\\"success\\\",\\n    \\\"data\\\": [\\n        {\\n            \\\"id\\\": 1,\\n            \\\"dept_id\\\": 1,\\n            \\\"user_name\\\": \\\"admin\\\",\\n            \\\"nick_name\\\": \\\"如梦技术\\\",\\n            \\\"email\\\": \\\"596392912@qq.com\\\",\\n            \\\"phone\\\": \\\"15888888888\\\",\\n            \\\"gender\\\": 1,\\n            \\\"avatar\\\": \\\"\\\",\\n            \\\"password\\\": \\\"$2a$04$G9osrOEAABaO.Oi35ssV3.duz.fEF/tET7MGg7W6ulCgKrWeg.Z6e\\\",\\n            \\\"is_admin\\\": true,\\n            \\\"enabled\\\": true,\\n            \\\"locked\\\": false,\\n            \\\"del_flag\\\": false,\\n            \\\"created_by\\\": \\\"admin\\\",\\n            \\\"created_at\\\": \\\"2018-03-16T11:33:00\\\",\\n            \\\"updated_by\\\": \\\"admin\\\",\\n            \\\"updated_at\\\": \\\"2020-05-21T22:22:46\\\",\\n            \\\"remark\\\": \\\"超级管理员\\\"\\n        },\\n        {\\n            \\\"id\\\": 2,\\n            \\\"dept_id\\\": 1,\\n            \\\"user_name\\\": \\\"mica\\\",\\n            \\\"nick_name\\\": \\\"如梦技术\\\",\\n            \\\"email\\\": \\\"596392912@qq.com\\\",\\n            \\\"phone\\\": \\\"15666666666\\\",\\n            \\\"gender\\\": 1,\\n            \\\"avatar\\\": \\\"\\\",\\n            \\\"password\\\": \\\"$2a$04$G9osrOEAABaO.Oi35ssV3.duz.fEF/tET7MGg7W6ulCgKrWeg.Z6e\\\",\\n            \\\"is_admin\\\": false,\\n            \\\"enabled\\\": true,\\n            \\\"locked\\\": false,\\n            \\\"del_flag\\\": false,\\n            \\\"created_by\\\": \\\"admin\\\",\\n            \\\"created_at\\\": \\\"2018-03-16T11:33:00\\\",\\n            \\\"updated_by\\\": \\\"admin\\\",\\n            \\\"updated_at\\\": \\\"2018-03-16T11:33:00\\\",\\n            \\\"remark\\\": \\\"普通用户\\\"\\n        },\\n        {\\n            \\\"id\\\": 3,\\n            \\\"dept_id\\\": 1,\\n            \\\"user_name\\\": \\\"test\\\",\\n            \\\"nick_name\\\": \\\"如梦技术\\\",\\n            \\\"email\\\": \\\"596392912@qq.com\\\",\\n            \\\"phone\\\": \\\"15666666666\\\",\\n            \\\"gender\\\": 1,\\n            \\\"avatar\\\": \\\"\\\",\\n            \\\"password\\\": \\\"$2a$04$G9osrOEAABaO.Oi35ssV3.duz.fEF/tET7MGg7W6ulCgKrWeg.Z6e\\\",\\n            \\\"is_admin\\\": false,\\n            \\\"enabled\\\": true,\\n            \\\"locked\\\": false,\\n            \\\"del_flag\\\": false,\\n            \\\"created_by\\\": \\\"admin\\\",\\n            \\\"created_at\\\": \\\"2018-03-16T11:33:00\\\",\\n            \\\"updated_by\\\": \\\"admin\\\",\\n            \\\"updated_at\\\": \\\"2018-03-16T11:33:00\\\",\\n            \\\"remark\\\": \\\"测试用户\\\"\\n        }\\n    ],\\n    \\\"timestamp\\\": 1617440226493,\\n    \\\"executeTime\\\": 41\\n}\",\n  \"description\" : null,\n  \"optionMap\" : { }\n}\r\n================================\r\nvar sql = \"\"\"\n    select * from sys_user;\n\"\"\"\nreturn db.select(sql);');
INSERT INTO `magic_api_file` VALUES (7, '/magic-api/api/通用接口/', 'this is directory');
INSERT INTO `magic_api_file` VALUES (8, '/magic-api/api/通用接口/group.json', '{\n  \"id\" : \"3d281ecb33cb4f229016cfd1d717e668\",\n  \"name\" : \"通用接口\",\n  \"type\" : \"1\",\n  \"parentId\" : \"0\",\n  \"path\" : \"/commons\"\n}');
INSERT INTO `magic_api_file` VALUES (9, '/magic-api/api/通用接口/获取验证码.ms', '{\n  \"id\" : \"bc6ecdc8774740e487b4660533090ea5\",\n  \"script\" : null,\n  \"groupId\" : \"3d281ecb33cb4f229016cfd1d717e668\",\n  \"name\" : \"获取验证码\",\n  \"createTime\" : null,\n  \"updateTime\" : null,\n  \"method\" : \"GET\",\n  \"path\" : \"/captcha\",\n  \"parameters\" : [ ],\n  \"option\" : \"[]\",\n  \"requestBody\" : \"{}\",\n  \"headers\" : [ ],\n  \"paths\" : [ ],\n  \"responseBody\" : \"{\\n    \\\"code\\\": 1,\\n    \\\"message\\\": \\\"success\\\",\\n    \\\"data\\\": {\\n        \\\"uuid\\\": \\\"f80feb4dcc8742669a2926eefa201bca\\\",\\n        \\\"base64\\\": \\\"\\\"\\n    },\\n    \\\"timestamp\\\": 1617617649402,\\n    \\\"executeTime\\\": 24\\n}\",\n  \"description\" : null,\n  \"optionMap\" : { }\n}\r\n================================\r\nimport \'net.dreamlu.mica.captcha.service.ICaptchaService\' as captchaService; // 导入Spring中的bean\n// 生成base64验证码，mica-captcha，也支持图片验证码，具体请查看文档\nreturn captchaService.generateBase64Vo(uuid());');
INSERT INTO `magic_api_file` VALUES (10, '/magic-api/api/通用接口/获取用户ip信息.ms', '{\n  \"id\" : \"cf37bf44b4cc4a31935f584ca053c118\",\n  \"script\" : null,\n  \"groupId\" : \"3d281ecb33cb4f229016cfd1d717e668\",\n  \"name\" : \"获取用户ip信息\",\n  \"createTime\" : null,\n  \"updateTime\" : null,\n  \"method\" : \"GET\",\n  \"path\" : \"/ip\",\n  \"parameters\" : [ ],\n  \"option\" : \"[]\",\n  \"requestBody\" : \"{}\",\n  \"headers\" : [ ],\n  \"paths\" : [ ],\n  \"responseBody\" : \"{\\n    \\\"code\\\": 1,\\n    \\\"message\\\": \\\"success\\\",\\n    \\\"data\\\": {\\n        \\\"cityId\\\": null,\\n        \\\"country\\\": null,\\n        \\\"region\\\": null,\\n        \\\"province\\\": null,\\n        \\\"city\\\": \\\"内网IP\\\",\\n        \\\"isp\\\": \\\"内网IP\\\",\\n        \\\"dataPtr\\\": 16392,\\n        \\\"address\\\": \\\"内网IP\\\",\\n        \\\"addressAndIsp\\\": \\\"内网IP\\\"\\n    },\\n    \\\"timestamp\\\": 1617441236786,\\n    \\\"executeTime\\\": 53\\n}\",\n  \"description\" : null,\n  \"optionMap\" : { }\n}\r\n================================\r\nimport \'net.dreamlu.mica.ip2region.core.Ip2regionSearcher\' as ip2regionSearcher;\nimport \'net.dreamlu.mica.core.utils.WebUtil\'; // as 可以省略（省略的话是相当于 as 类名）\n// 读取用户当前 ip 地址信息\nreturn ip2regionSearcher.memorySearch(WebUtil.getIP());');
INSERT INTO `magic_api_file` VALUES (21, '/magic-api/datasource/', 'this is directory');
COMMIT;
